<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第 04 题</title>
    <script type="text/javascript">
        /*
            04、编写函数rev(char) 实现将字符串char倒置，比如rev("spring") 返回"gnirps"
        */

        function rev(char) {
            char = char.split("").reverse().join("");
            console.log(char);
        }
        rev("spring");
    </script>
</head>

<body>

</body>

</html>